set(BIN_NAME vnc_record)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5WebSockets REQUIRED)
find_package(ZLIB REQUIRED)

message(${ZLIB_LIBRARIES})
include_directories( ${ZLIB_INCLUDE_DIRS})
add_executable(${BIN_NAME}
  main.cpp
  zlib/zlib_tool.cpp 
  rfb/encoding_tight.cpp 
  rfb/rfb_data_process.cpp 
  rfb/lock_stream.cpp
  ffmpeg/raw2mp4.cpp)
target_link_libraries(${BIN_NAME} Qt5::Core Qt5::Gui Qt5::Network Qt5::WebSockets  ${ZLIB_LIBRARIES}
libavutil.so libavcodec.so libavformat.so  libswscale.so pthread)

